export const YearMonthDay = date => {
    date = new Date(date);
    let year = date.getFullYear();
    let month = date.getMonth() + 1;
    let day = date.getDate();
    return year + "-" + month + "-" + day;
};

export const YearMonthDayHoursMinutesSeconds = date => {
    date = new Date(date);
    let year = date.getFullYear();
    let month = date.getMonth() + 1;
    let day = date.getDate();
    let hours = date.getHours();
    let minutes = date.getMinutes();
    let seconds = date.getSeconds();
    return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
};

export const YearMonth = date => {
    date = new Date(date);
    let year = date.getFullYear();
    let month = date.getMonth() + 1;
    return year + "-" + month;
};